<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 13044
  Date: 2020/6/4
  Time: 14:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <link rel="stylesheet" href="../css/home.css">
    <script src="../js/jquery-3.1.1.min.js"></script>
    <%--    <script src="../js/common.js"></script>--%>
</head>

<body>
<!--div块级元素：会自动换行，
div想要在一行，我们需要用到浮动
float:left 左浮动
float:right 有浮动
class类名的规范：破折号company-logo，见名知意
-->
<!--上边部分-->

<jsp:include page="top.jsp"></jsp:include>
<!--中间部分-->
<div class="middle">
    <div class="middle-content">
        <div class="jxdt banner floatLeft">
            <div>较新动态</div>
            <div>
                <div class="floatLeft"><img src="../img/m331.jpg" height="190" width="268"/></div>
                <div class="floatRight">
                    <c:forEach items="${newsList}" var="newsModel">
                        <div>
                            <h4>${newsModel.title}</h4>
                            <p>${newsModel.content}</p>
                        </div>
                    </c:forEach>

                </div>
            </div>
        </div>
        <div class="cpzs banner floatRight">
            <div>产品展示</div>
            <div>
                <c:forEach items="${productList}" var="productModel" varStatus="aa">
                <c:if test="${aa.count==1}">
                <div class="floatLeft">
                </c:if>
                <c:if test="${aa.count!=1}">
                    <div class="floatRight">
                </c:if>
                            <div><img src="${productModel.imgHref}" height="300" width="300"/></div>
                            <div>
                                <h4>${productModel.title}</h4>
                                <p>${productModel.content}</p>
                            </div>
                        </div>
                        </c:forEach>

                    </div>
                </div>
            </div>
        </div>
        <!--下边部分-->
        <jsp:include page="foot.jsp"></jsp:include>
</body>
</html>